package com.xtpt.disaster.controller.VO;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.stereotype.Component;

/**
 *用于SQLServer恢复的实体类
 */
@Component
public class SQLServerRecoverInfo {
    @ApiModelProperty(value = "作业id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long jobDetailId;

    @ApiModelProperty(value = "dbid")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long dbId;

    @ApiModelProperty(value = "恢复任务名称")
    private String taskName;

    /**
     * 任务类型写死为1，恢复
     */
    @ApiModelProperty(value = "任务类型")
    private Integer jobType;

    /**
     * 任务执行类型，写死为0立即执行。
     */
    @ApiModelProperty(value = "任务执行类型")
    private Integer scheduleType;

    public SQLServerRecoverInfo() {

    }

    public SQLServerRecoverInfo(Long jobDetailId, Long dbId, String taskName, Integer jobType, Integer scheduleType) {
        this.jobDetailId = jobDetailId;
        this.dbId = dbId;
        this.taskName = taskName;
        this.jobType = jobType;
        this.scheduleType = scheduleType;
    }

    public Long getJobDetailId() {
        return jobDetailId;
    }

    public void setJobDetailId(Long jobDetailId) {
        this.jobDetailId = jobDetailId;
    }

    public Long getDbId() {
        return dbId;
    }

    public void setDbId(Long dbId) {
        this.dbId = dbId;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public Integer getJobType() {
        return jobType;
    }

    public void setJobType(Integer jobType) {
        this.jobType = jobType;
    }

    public Integer getScheduleType() {
        return scheduleType;
    }

    public void setScheduleType(Integer scheduleType) {
        this.scheduleType = scheduleType;
    }

    @Override
    public String toString() {
        return "SQLServerRecoverInfo{" +
                "jobDetailId=" + jobDetailId +
                ", dbId=" + dbId +
                ", taskName='" + taskName + '\'' +
                ", jobType=" + jobType +
                ", scheduleType=" + scheduleType +
                '}';
    }
}
